module.exports = function(window, document) {
	var apivm = require('../../common/avm.min')(window, document);
	var avm = apivm;
	var api = apivm.api;
	var Component = apivm.Component;
	var $ = apivm.$;
	(function() {
	var Tabbar = /*@__PURE__*/ (function(Component) {
		function Tabbar(props) {
			Component.call(this, props);
			this.data = {};
		}

		if (Component) Tabbar.__proto__ = Component;
		Tabbar.prototype = Object.create(Component && Component.prototype);
		Tabbar.prototype.constructor = Tabbar;
		Tabbar.prototype.apiready = function() {};
		Tabbar.prototype.goPage = function(pagename) {
			var pagePath = {
				index: "../index/index",
				friend: "../friend/friend",
				addVideo: "../addVideo/addVideo",
				message: "../message/message",
				me: "../me/me"
			};

			// api.openWin({
			// 	name: pagename,
			// 	url: pagePath[pagename]
			// })
			wx.redirectTo({url: pagePath[pagename]});
		};
		Tabbar.prototype.render = function() {
			var this$1 = this;
			return apivm.h(
				"view",
				{class: "tabbar"},
				apivm.h(
					"view",
					{
						class: "tab-item",
						style: {color: this.props.active == "index" ? "#fff" : "#ccc"},
						onClick: function() {
							return this$1.goPage("index");
						}
					},
					"首页"
				),
				apivm.h(
					"view",
					{
						class: "tab-item",
						style: {color: this.props.active == "friend" ? "#fff" : "#ccc"},
						onClick: function() {
							return this$1.goPage("friend");
						}
					},
					"朋友"
				),
				apivm.h(
					"view",
					{
						class: "tab-item",
						onClick: function() {
							return this$1.goPage("addVideo");
						}
					},
					apivm.h("image", {src: "../../image/add.png"})
				),
				apivm.h(
					"view",
					{
						class: "tab-item",
						style: {color: this.props.active == "message" ? "#fff" : "#ccc"},
						onClick: function() {
							return this$1.goPage("message");
						}
					},
					"消息"
				),
				apivm.h(
					"view",
					{
						class: "tab-item",
						style: {color: this.props.active == "me" ? "#fff" : "#ccc"},
						onClick: function() {
							return this$1.goPage("me");
						}
					},
					"我"
				)
			);
		};

		return Tabbar;
	})(Component);
	apivm.define("tabbar", Tabbar);

	var Message = /*@__PURE__*/ (function(Component) {
		function Message(props) {
			Component.call(this, props);
			this.data = {
				messages: [
					{
						id: "000",
						nickname: "小庆幸",
						list: [
							{
								from: {
									nickname: "小庆幸",
									headimg: "https://a415432669.github.io/shortvideo/000.jpg"
								},

								to: {
									nickname: "老陈打码",
									headimg: "https://a415432669.github.io/shortvideo/001.jpg"
								},

								content: "新年快乐,万事如意",
								pubtime: "2021-12-31 01:07"
							}
						],

						desc: "10分钟内在线",
						headimg: "https://a415432669.github.io/shortvideo/000.jpg"
					},
					{
						id: "001",
						nickname: "琪琪",
						list: [
							{
								from: {
									nickname: "琪琪",
									headimg: "https://a415432669.github.io/shortvideo/001.jpg"
								},

								to: {
									nickname: "老陈打码",
									headimg: "https://a415432669.github.io/shortvideo/001.jpg"
								},

								content: "新年快乐,万事如意",
								pubtime: "2021-12-31 01:07"
							}
						],

						desc: "今天在线",
						headimg: "https://a415432669.github.io/shortvideo/001.jpg"
					},
					{
						id: "002",
						nickname: "悦悦宝宝",
						list: [
							{
								from: {
									nickname: "悦悦宝宝",
									headimg: "https://a415432669.github.io/shortvideo/002.jpg"
								},

								to: {
									nickname: "老陈打码",
									headimg: "https://a415432669.github.io/shortvideo/001.jpg"
								},

								content: "新年快乐,万事如意",
								pubtime: "2021-12-31 01:07"
							}
						],

						desc: "10分钟内在线",
						headimg: "https://a415432669.github.io/shortvideo/002.jpg"
					},
					{
						id: "003",
						nickname: "喜来宝",
						list: [
							{
								from: {
									nickname: "喜来宝",
									headimg: "https://a415432669.github.io/shortvideo/003.jpg"
								},

								to: {
									nickname: "老陈打码",
									headimg: "https://a415432669.github.io/shortvideo/001.jpg"
								},

								content: "新年快乐,万事如意",
								pubtime: "2021-12-31 01:07"
							}
						],

						desc: "10分钟内在线",
						headimg: "https://a415432669.github.io/shortvideo/003.jpg"
					},
					{
						id: "004",
						nickname: "爱吃蛋挞",
						list: [
							{
								from: {
									nickname: "小庆幸",
									headimg: "https://a415432669.github.io/shortvideo/004.jpg"
								},

								to: {
									nickname: "老陈打码",
									headimg: "https://a415432669.github.io/shortvideo/001.jpg"
								},

								content: "新年快乐,万事如意",
								pubtime: "2021-12-31 01:07"
							}
						],

						desc: "1分钟内在线",
						headimg: "https://a415432669.github.io/shortvideo/004.jpg"
					},
					{
						id: "005",
						nickname: "小庆幸",
						list: [
							{
								from: {
									nickname: "小庆幸",
									headimg: "https://a415432669.github.io/shortvideo/000.jpg"
								},

								to: {
									nickname: "老陈打码",
									headimg: "https://a415432669.github.io/shortvideo/001.jpg"
								},

								content: "新年快乐,万事如意",
								pubtime: "2021-12-31 01:07"
							}
						],

						desc: "10分钟内在线",
						headimg: "https://a415432669.github.io/shortvideo/000.jpg"
					}
				]
			};
		}

		if (Component) Message.__proto__ = Component;
		Message.prototype = Object.create(Component && Component.prototype);
		Message.prototype.constructor = Message;
		Message.prototype.apiready = function() {};
		Message.prototype.render = function() {
			return apivm.h(
				"view",
				{class: "page"},
				apivm.h(
					"view",
					{class: "messages"},
					Object.entries(this.data.messages).map(function(ref) {
						var index$1 = ref[0];
						var item$1 = ref[1];
						return apivm.h(
							"view",
							{class: "msg-item"},
							apivm.h(
								"view",
								{class: "msg-header"},
								apivm.h("image", {src: item$1.headimg}),
								apivm.h(
									"view",
									{class: "info"},
									apivm.h("view", {class: "username"}, item$1.nickname),
									apivm.h("view", {class: "desc"}, item$1.desc)
								)
							)
						);
					})
				),
				apivm.h("tabbar", {active: "message"})
			);
		};

		return Message;
	})(Component);
	apivm.define("message", Message);
	apivm.render(apivm.h("message", null), "body");
})();

	window['createApp'] = function() {
		apivm.$_start();
	}
	return avm;
}